home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-18 | 3.1 KB | 145 lines | [TEXT/KAHL] |
- typedef enum {
- eInitialClick,
- eFirstMouseUp,
- eSecondClick,
- eSecondMouseUp
- } ClickSet;
-
- typedef enum {
- eNullEvent,
- eStart, // grab the mouse position for restoration later, if needed
-
- eStopBad, // don't you let that deal go down
- eStopGood, // let that wheel go round!
- eStopCleanup, // for internal use only!
-
- eNextMenu,
- ePrevMenu,
- eFirstMenu,
- eLastMenu,
- ePrevItem,
- eNextItem
- } StickyEvent;
-
- /******************************************************************************************/
-
- class PostEventPatch : public GenericPatch {
- public:
- PostEventPatch(void);
- void Behavior(void);
-
- long FakeNavigation(void);
-
- private:
- ClickSet itsClick;
- Point itsLastMouse;
- unsigned long itsLastTime;
- };
-
- /******************************************************************************************/
-
- class ButtonPatch : public GenericPatch {
- public:
- ButtonPatch(void);
- void Behavior(void);
- };
-
- typedef struct {
- short itsResult;
- } ButtonPatchParms;
-
- /******************************************************************************************/
-
- #if 1
- class PopupMenuSelectPatch : public GenericPatch {
- public:
- PopupMenuSelectPatch(void);
- virtual void Behavior(void);
- };
-
- typedef struct {
- short itsItem;
- short itsLeft;
- short itsTop;
- MenuHandle itsMenuHandle;
- unsigned long itsResult;
- } PopupMenuSelectParameters;
-
- typedef struct PopupMenuSelectParameters ;
- typedef pascal long (*PopupMenuSelectProcPtr) (MenuHandle theMenu, short top, short left, short item);
-
- #endif
-
- /******************************************************************************************/
-
- class MenuSelectPatch : public GenericPatch {
- public:
- MenuSelectPatch();
- virtual void Behavior(void);
- };
-
- typedef struct MenuSelectParameters {
- Point itsStartPt;
- long itsResult;
- } MenuSelectParameters;
-
- typedef pascal long (*MenuSelectProcPtr) (Point pt);
-
- /******************************************************************************************/
-
- class GetMousePatch : public GenericPatch {
- public:
- GetMousePatch();
- virtual void Behavior(void);
- };
-
- typedef struct GetMouseParameters {
- Point *itsPoint;
- unsigned long dummy;
- } GetMouseParameters;
-
- /******************************************************************************************/
-
- class EventAvailPatch : public GenericPatch {
- public:
- EventAvailPatch();
- virtual void Behavior();
-
- void SetStickyEvent(StickyEvent event);
- void SetupNavigation(void);
-
- private:
- short NumRealMenus(void);
- short FindMenuItemVPos(MenuHandle hMenu, short item);
-
- Boolean FindMenuTitleLoc(Boolean next, Point *loc);
- Boolean FindFirstMenuLoc(Point *loc);
- Boolean FindLastMenuLoc(Point *loc);
- Boolean FindMenuItemLoc(Boolean next, Point *loc);
-
- private:
- StickyEvent itsEvent;
- Boolean itsFromStart;
- Point itsInitialLoc;
- };
-
- typedef struct EventAvailParameters {
- EventRecord *itsEvent;
- short itsMask;
- Boolean itsResult;
- } EventAvailParameters;
-
- ///////////////////////////////////////////////////////////////////////////
-
- class MenuKeyPatch : public GenericPatch {
- public:
- MenuKeyPatch(void);
- virtual void Behavior(void);
- };
-
- typedef struct {
- char padding;
- char itsKey;
- unsigned long itsResult;
- } MenuKeyParameters;
-